<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>报名系统 - 江西农业大学大学生软件设计大赛</title>

<!-- Bootstrap core CSS -->
<link href="${base}/assets/libs/bootstrap/3.3.7/css/bootstrap.css"
	rel="stylesheet">

</head>
<body role="document">
	<input type="hidden" id="base" value="${base}">
	<!-- Fixed navbar -->
	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="container">
			<div id="navbar" class="navbar-collapse collapse">
				<ul class="nav navbar-nav">
					<li><a href="#">首 页</a></li>
					<!--<li><a href="#about">报名流程</a></li>-->
					<!--<li><a href="#contact">注册队伍</a></li>-->
					<li><a href="${base}/view/userInfo">个人主页</a></li>
					<li><a href="${base}/logout">注销</a></li>
				</ul>
			</div>
		</div>
	</nav>
	<div class="container theme-showcase" role="main">
		<div class="row">
			<div class="col-md-4 col-md-offset-4">
				<br /> <br /> <br />
				<div class="page-header">
					<h2>修改密码</h2>
				</div>
				<form action="<c:url value='/ModifyServlet'/>" method="post">
					<!-- 调用StuServlet中的regist方法 -->
					<input type="hidden" name="method" value="editPassword" />
					<div class="form-group ">
						<input name="oldpw" type="password" class="form-control"
							id="oldpw" placeholder="原密码"> <span id="errorSpan"
							style="color: red;">${errors.oldpw}</span>
					</div>
					<div class="form-group ">
						<input name="newpw" type="password" class="form-control"
							id="newpw" placeholder="新密码"> <span id="errorPassword"
							style="color: red;">${errors.newpw}</span>
					</div>
					<div class="form-group ">
						<input name="repw" type="password" class="form-control"
							id="repw" placeholder="重复新密码"> <span id="repassword"
							style="color: red;">${errors.repw}</span>
					</div>
					<div class="form-group " id="captchaVcode">
						<input type="text" name="vcode" id="vcode"
							class="form-control" placeholder="验证码"> <img id="captcha" src="${base}/user/getGifCode" />
					</div>
					<button type="button" id="modifyPassword" class="btn btn-primary">修改</button>
				</form>
			</div>
		</div>
	</div>
	<script type="text/javascript"
		src="${base}/assets/libs/jquery/1.12.4/jquery.js"></script>
	<script type="text/javascript"
		src="${base}/assets/libs/bootstrap/3.3.7/js/bootstrap.js"></script>
	<script type="text/javascript" src="${base}/assets/js/modify.js"></script>
	<script>
		jQuery(document).ready(function() {
			//验证码
			$("#captchaVcode").on("click", 'img', function() {
				/**动态验证码，改变地址，多次在火狐浏览器下，不会变化的BUG，故这样解决*/
				var i = new Image();
				i.src = '${base}/user/getGifCode?' + Math.random();
				$(i).replaceAll(this);
			});

		});
	</script>
</body>
</html>
